<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选项卡</title>
    <style>
        *{
            padding: 0;
            margin: 0;
            list-style: none;
        }

        .container{
            width: 600px;
            height: 300px;
            margin: 50px auto;
            border: 1px solid red;
        }
        .title{
            width: 100%;
            height: 20%;
            background-color: antiquewhite;
            display: flex;
        }
        .title li{
            width: 33.33%;
        }
        .content{
            width: 100%;
            height: 80%;
            background-color: rgb(180, 251, 87);
        }
        .content li{
            width: 100%;
            height: 100%;
            display: none;
        }
        .show{ display: block !important;}
        .active{ background: skyblue !important;;}
    </style>
</head>
<body>
    <div class="container">
        <ul class="title">
            <li class="active">a</li>
            <li>b</li>
            <li>c</li>
        </ul>
        <ul class="content">
            <li class="show">1</li>
            <li>2</li>
            <li>3</li>
        </ul>
    </div>
</body>
<script src="./index.js"></script>
</html>